1. Field of the Invention
This invention relates to a video signal encoding and recording apparatus with a variable transmission rate. Also, this invention relates to a method of encoding and recording a video signal at a variable transmission rate.
2. Description of the Related Art
It is known to use an MPEG2 (Moving Picture Experts Group phase 2) encoding apparatus in processing and compressing a video signal to be recorded on a recording medium.
Japanese published unexamined patent application 6-141298 discloses a variable-transmission-rate encoding apparatus for a moving picture signal. In the apparatus of Japanese application 6-141298, a picture-information transmission rate is controlled for every unit time during the encoding of the moving picture signal. The transmission rate control is designed so that the total code amount (the total number of bits) of the encoding-resultant signal will be equal to a prescribed value.
In the apparatus of Japanese application 6-141298, the encoding of the moving picture signal is implemented twice. The first encoding is preliminary encoding to calculate and determine a target transmission rate for every unit time. In the second encoding which follows the first encoding, the moving picture signal is processed in response to the target transmission rate for every unit time. A picture signal which results from the second encoding is used as a final encoding-resultant signal recorded on a recording medium or transmitted to an external apparatus.
In the apparatus of Japanese application 6-141298, during the preliminary encoding, a tentative code amount counter responsive to the output signal of a variable length coder detects the code amount of an encoding-resultant signal for every unit time. The tentative code amount counter determines a tentative transmission rate in accordance with the detected code amount for every unit time. An information piece of the tentative transmission rate for every unit time is stored in a memory. After the preliminary encoding has been completed, information pieces of tentative transmission rates for all the unit times are in the memory. Target transmission rates for respective unit times are calculated and determined in response to the tentative transmission rates. During the second encoding, the output signal of the variable length coder is written into a buffer. For every unit time, the signal is read out from the buffer in response to the target transmission rate. The signal which has been read out from the buffer is a final encoding-resultant signal.
Japanese published unexamined patent application 9-23423 discloses a variable-rate encoding apparatus for a moving picture signal. The apparatus of Japanese application 9-23423 implements the encoding of a video signal at an optimum encoding rate on an almost real-time basis. The optimum encoding rate is determined on the basis of the complexity of every picture represented by the video signal.
The apparatus of Japanese application 9-23423 includes a picture analysis circuit which calculates a mean value (L) and a variance (V) of a luminance signal in the video signal for every prescribed time. Also, the picture analysis circuit calculates mean values (R) of chrominance signals in the video signal for every prescribed time. Furthermore, the picture analysis circuit calculates a mean value (M) of motion vectors represented by the video signal for every prescribed time. In the apparatus of Japanese application 9-23423, an encoding control circuit determines a desired encoding bit rate on the basis of parameters including the mean luminance value (L), the luminance variance (V), the mean chrominance values (R), and the mean motion-vector value (M) which are calculated by the picture analysis circuit. For every prescribed time, the video signal is encoded at the desired encoding bit rate.